﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Lottery.WPSOffice;

namespace Lottery.MediaData.Core {
    public static class BatchLoadExcel {
        public static List<BatchDataItem> Load(string fileName) {
            var result = new List<BatchDataItem>();

            var data = BatchGen.Import310Data(fileName);
            foreach (var item in data) {
                var bdi = new BatchDataItem();
                result.Add(bdi);
                bdi.Order = item[0];
                for (int i = 0; i < 14; i++) {
                    bdi[i].Three = item[i * 3 + 1];
                    bdi[i].One = item[i * 3 + 2];
                    bdi[i].Zero = item[i * 3 + 3];
                }
            }

            return result;
        }
    }
}
